package zhishu.iceyyy.com.kd_khd.adapter;

import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;

import java.text.SimpleDateFormat;
import java.util.Date;

import zhishu.iceyyy.com.kd_khd.R;
import zhishu.iceyyy.com.kd_khd.base.BaseApplication;
import zhishu.iceyyy.com.kd_khd.base.Base_Z_Adapter;

/**
 * Created by juli on 2019/9/2.
 */

public class DemoAdapter extends Base_Z_Adapter {
    String zt;

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        DemoAdapter.Holder holder = null;
        // 查找控件
        if (null == convertView) {
            convertView = LayoutInflater.from(BaseApplication.getInstance())
                    .inflate(R.layout.tab_item_1_cx, null);
            holder = new DemoAdapter.Holder();


            holder.fen = (TextView) convertView
                    .findViewById(R.id.fen);
            holder.ri = (TextView) convertView
                    .findViewById(R.id.ri);
            holder.pjwd = (TextView) convertView
                    .findViewById(R.id.pjwd);
            holder.yc = (LinearLayout) convertView
                    .findViewById(R.id.yc);

            // 缓存Holder
            convertView.setTag(holder);
        } else {
            holder = (DemoAdapter.Holder) convertView.getTag();
        }
        Log.e("7788", mDataList.size() + "a");
        Log.e("7788", position + "b");

        String nrowDataeme = (String) getItem(position);





        return convertView;
    }


    public class Holder {


        TextView fen;
        TextView pjwd;
        TextView ri;
        LinearLayout yc;
    }

    public static String getStrTime(String cc_time) {
        String re_StrTime = null;
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日HH时mm分ss秒");
// 例如：cc_time=1291778220
        long lcc_time = Long.valueOf(cc_time);
        re_StrTime = sdf.format(new Date(lcc_time * 1000L));
        return re_StrTime;
    }

}
